// 4.创建date.js该文件正确封装并且导出格式化日期方法；
const datetime=(time)=>{
    const nian=new Date(time).getFullYear()
    const yue=new Date(time).getMonth()+1
    const ri=new Date(time).getDate()
    const shi=new Date(time).getHours()
    const fen=new Date(time).getMinutes()
    const miao=new Date(time).getSeconds()

    return nian+'-'+yue+'-'+ri+'-'+shi+'-'+fen+'-'+miao
}
module.exports = {
    datetime
}